#include "calculator.h"

#ifdef USE_PLUS
double add(double a, double b) {
    return a + b;
}
#endif

#ifdef USE_MINUS
double subtract(double a, double b) {
    return a - b;
}
#endif

#ifdef USE_MUL
double multiply(double a, double b) {
    return a * b;
}
#endif

#ifdef USE_DIV
double divide(double a, double b) {
    if (b == 0) {
        throw "Division by zero!";
    }
    return a / b;
}
#endif
